import { createRouter, createWebHistory } from 'vue-router'
import shopHome from '@/views/home/shop-home.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
   {
    path: '/',
    redirect: '/home'
   },
   {
    path: '/home',
    name:'home',
    component:shopHome,
    meta:{home:true}
   },
   {
    path: '/cate',
    name:'cate',
    component:()=> import('@/views/cate/shop-cate.vue'),
    meta:{more:true}
   },
   {
    path: '/cart',
    name:'cart',
    component:()=> import('@/views/cart/shop-cart.vue'),
    meta:{more:true}
   },
   {
    path: '/self',
    name:'self',
    component:()=> import('@/views/self/shop-self.vue')
   },
   {
    path: '/login',
    name:'login',
    component:()=> import('@/views/login/shopLogin.vue'),
    meta:{footerHidden:true}
   },
   {
    path: '/register',
    name:'register',
    component:()=> import('@/views/register/register.vue'),
    meta:{footerHidden:true}
   },
   {
    path: '/search',
    name:'search',
    component:()=> import('@/views/search/shopSearch.vue'),
    meta:{ search:true }
   },
   {
    path: '/list',
    name:'list',
    component:()=> import('@/views/list/shopList.vue')
   },
   {
    path: '/detail',
    name:'detail',
    component:()=> import('@/views/detail/shopDetail.vue')
   },
  ]
})

export default router
